﻿@{
    ViewBag.Title = "Cập nhật lựa chọn quảng bá";
    Layout = "~/Views/Shared/_Layout.Management.cshtml";
}

<form method="post" class="form" action="/Management/BannerOptionList/Edit/@ViewBag.BannerOptionId">
	<fieldset id="firstStep">
		<h2 class="app">
	        <strong>Cập nhật lựa chọn quảng bá</strong>
        </h2>
		<div class="errorMessage" data-bind="visible: InvalidateForm" >
			<span class="error">Xin hãy nhập thông tin bên dưới chính xác.</span>
		</div>			
		<div class="title">
			<h3>Thông tin bảng lựa chọn quảng cáo</h3>
		</div>
		<div class="columns">
			<div class="col ident">
				<div class="row">
					<label>Tên lựa chọn:</label>
					<input class="text" type="text" data-bind="value: Name, attr:{maxlength:50}" name="Name" />
                </div>  
				<div class="row">
					<label for="select1">Vị trí:</label>
					<div class="select-holder">
						<select class="select1" data-bind='value: Position, foreach: PositionList, optionsCaption: "Select Option"' name="BannerPosition">
							<option data-bind="value: ID, text: Name">Lựa chọn vị trí</option>
						</select>
					</div>
				</div>      
				<div class="row">
					<label for="select1">Nhóm:</label>
					<div class="select-holder">
						<select class="select1" data-bind='value: Group, foreach: GroupList, optionsCaption: "Select Option"' name="BannerGroup">
							<option data-bind="value: ID, text: Name">Lựa chọn nhóm</option>
						</select>
					</div>
				</div>        
				<div class="row">
					<label>Thời gian/đơn vị tính:</label>
                    <div class="input-holder"> 
                        <input class="text middle" type="text" data-bind="value: LongTimeValue, attr:{maxlength:5}" name="LongTimeValue" />
                        <span class="divider"></span>
					    <input class="text small" type="text" data-bind="value: LongTimeUnit, attr:{maxlength:5}" name="LongTimeUnit" />
                    </div>					
                </div>   
				<div class="row">
					<label>Giá /đơn vị tính:</label>
                    <div class="input-holder">                    
					    <input class="text middle" type="text" data-bind="value: Price, attr:{maxlength:10}" name="Price" />
                        <span class="divider"></span>
					    <input class="text small" type="text" data-bind="value: UnitPrice, attr:{maxlength:5}" name="UnitPrice" />
                    </div>
                </div>           
			</div>
            <div class="col">                       
				<div class="row">
					<label>Lựa chọn mặc định:</label>
                    <div class="groupinput" id="editform">
                        <input type="checkbox" data-bind="checked: IsDefault" name="IsDefault" />
                    </div>
				</div>                          
				<div class="row">
					<label>Kích hoạt:</label>
                    <div class="groupinput" id="editform">
                        <input type="checkbox" data-bind="checked: Active" name="Active" />
                    </div>
				</div>
				<div class="row">
					<label>Mô tả ngắn:</label>
					<input class="text" type="text" data-bind="value: ShortDesc, attr:{maxlength:50}" name="ShortDesc" />
                </div>     
				<div class="row">
					<label>Mô tả dài:</label>
                    <div class="groupinput">                    
					    <textarea class="text" rows="5" cols="50" data-bind="value: LongDesc, attr:{maxlength:250}" name="LongDesc"></textarea>
                    </div>
                </div> 
            </div>
		</div> 

        <!-- button below -->
		<div class="foot-info">
			<h3 class="centered-wbtn centered-wbtn-bottom save">
  				<span>
  					<a class="btn btn-cancel-page" href="/Management/BannerOptionList">previous</a>
					<input type="button" class="btn btn-submit-page" data-bind="click: SubmitForm" value="Submit" />
                </span>
			</h3>
		</div>
	</fieldset>
</form>
<script type="text/javascript">
    var data = @(Html.Raw(Json.Encode(Model)));
</script>
<script src="/Scripts/Banner/editbanneroption.js" type="text/javascript"></script>